import request from '@/utils/request'

// 查询消息通道列表
export function listChannel(query) {
  return request({
    url: '/system/channel/list',
    method: 'get',
    params: query
  })
}

// 查询消息通道详细
export function getChannel(messageChannelId) {
  return request({
    url: '/system/channel/' + messageChannelId,
    method: 'get'
  })
}

// 新增消息通道
export function addChannel(data) {
  return request({
    url: '/system/channel',
    method: 'post',
    data: data
  })
}

// 修改消息通道
export function updateChannel(data) {
  return request({
    url: '/system/channel',
    method: 'put',
    data: data
  })
}

// 删除消息通道
export function delChannel(messageChannelId) {
  return request({
    url: '/system/channel/' + messageChannelId,
    method: 'delete'
  })
}
